home *** CD-ROM | disk | FTP | other *** search
/ Inside Mac Games Volume 4 #4 / IMG 36 April 1996.iso / More Goodies / More for your Games / Marathon / Marathon 2 News #3 / Cool map! / Hata-V3 / Ignore Zero Divides ƒ / Readme < prev   
Text File  |  1996-01-06  |  4KB  |  33 lines

  1. Ignore Zero Divides V1.0
  2. Run “PPC only” Marathon maps on your Quadra (or any other 68K machine).
  3.  
  4. The situation
  5. You, proud owner of a powerful 68K Macintosh, have just downloaded a bunch of the latest Marathon/Marathon 2 maps from [insert your favourite online service here] and, with your headphones on and the lights in your room dimmed, you have launched the game to have a look at these maps. But then, after punching away the annoying “Marathon is using maps which were not created and by Bungie” dialog you find that the dialog was right when it told you about inexplicable crashes: “The application “unknown” has unexpectedly quit, because an error of type 4 occurred.”
  6. Damnit! You read the “Readme (or don't)” that came with the map only to find confirmed that “this map is PowerPC-only and crashes on 68K Macs”. The same thing happens with about half of the maps you downloaded. “Oh, no! Now I have to buy a PowerMac to play those maps!” you might think, but wait! The solution is “Ignore Zero Divides”!
  7.  
  8. What 's the problem?
  9. If a Marathon map runs on PowerMacs but not on 68K Macs, then there's a bug in the map (such as a zero-length polygon side or something) that causes Marathon's graphics engine to execute a division by zero. This is an undefined mathematical operation which is intercepted by the processor and (under normal conditions) results in the application being stopped and a “type 4” system error being brought up. The PowerPC processor handles zero divides in the same way, but obviously Bungie included more checks in the PowerPC version of the graphics engine to avoid crashes.
  10.  
  11. And what does “Ignore Zero Divides” do about it?
  12. My little program tells the 680x0 processor in your Macintosh not to worry about zero divides any longer and simply ignore them instead of quitting the application and showing the system error. Technically spoken: It sets the zero divide exception vector to point to an RTE instruction, so the processor will continue with the next instruction upon encountering a division by zero. With this simple trick, you are able to run most (if not all) maps that formerly crashed Marathon with a “type 4” system error.
  13.  
  14. OK, now how do I use it?
  15. Just launch “Ignore Zero Divides” before starting Marathon/Marathon 2. It will install its exception patch and automatically quit again. Then fire up Marathon and try the maps that used to crash before. Have fun!
  16.  
  17. My maps are still crashing!
  18. This program will only intercept zero divides. But there may be other kinds of errors in the map that cause Marathon to crash in different ways that are much harder to handle. In this case you should contact the creator of the map and ask him or her to fix the bugs. If Marathon still crashes with “type 4” system errors although you have launched “Ignore Zero Divides” before, then please tell me (EMail address below).
  19.  
  20. Misc. Notes
  21. “Ignore Zero Divides” is a hack that took 5 minutes to write. Once you started it, the processor will ignore all zero divides, even those not caused by buggy Marathon maps. This should be no problem unless you run some other buggy programs that would normally stop with a “type 4” system error but now continue with invalid data instead. Also, debuggers are no longer able to catch zero divides. So, to be on the safe side, you should launch “Ignore Zero Divides” only just before you are going to play Marathon. Although it is very improbable that “Ignore Zero Divides” makes any problems with other programs.
  22.  
  23. This program has been developed and tested on (believe it or not) an Amiga 4000 with a 50 MHz 68060 processor, 20 megs of RAM, a 24 bit accelerated graphics card, two SCSI-2 interfaces (1.5 GB hard disk space, triple-speed CD-ROM, ZIP drive) and Ethernet running MacOS 7.5.1 under my Macintosh emulator “ShapeShifter”. It has also been tested on a Quadra 630. I have tested several crashing “PPC-only” maps and all of them worked.
  24.  
  25. “Ignore Zero Divides” is ©1996 Christian Bauer but may be freely distributed as long as it is kept together with this text file.
  26.  
  27. Enjoy,
  28. Christian Bauer
  29.  
  30. EMail: bauec002@goofy.zdv.uni-mainz.de
  31. WWW: http://www.uni-mainz.de/~bauec002
  32. IRC: cebix on #amigager and #amiga
  33.